package com.weaver.drools.business.online.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.weaver.drools.business.online.service.UserOnlineService;
import com.weaver.drools.common.controller.CommonController;
import com.weaver.drools.common.entity.SysUserOnline;
@Controller
public class UserOnlineController extends CommonController{
	
	@Resource
	private UserOnlineService UserOnlineService;
	
	@RequestMapping(value = "queryOnlineUserList",method = RequestMethod.GET)
	public String OnlineUsers(HttpServletResponse response, HttpServletRequest request) throws Exception{
		List<SysUserOnline> userOnlineList= UserOnlineService.findSysUserOnlineList();
		request.setAttribute("userOnlineList", userOnlineList);
		return "sys/user/onlineList";
	}
}
